<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.nwpu.vote.model.*" %>
<%@ page import="com.nwpu.vote.control.*" %>
<%@ page import="java.util.List" %>

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link type="text/css" rel="stylesheet" href="css/main.css">
    <link type="text/css" rel="stylesheet" href="css/themes/cupertino/jquery-ui.css" />
	<script type="text/javascript" src="scripts/jquery.js"></script>
	<script type="text/javascript" src="scripts/jquery-ui.js"></script>
    <script>
		$(document).ready(function(){
			$("#startDate").datepicker();
			$("#finishDate").datepicker();
			
			$("#singleradio").buttonset();
			
			$(".plusbtn").button();
			$("#newvote").button();
			$("#attach").button();
			
		});
    </script>
	<title>新建投票</title>    
  </head>
  <body>
  	<div class="header">
  		<div class="logo"></div>
  		<div class="right">
  			<a href="login.html">登录</a>
		</div>
  	</div>
	
	<div style="clear:both"></div>
	<div class="leader">
		<div class="menu">
			<a href="index.jsp">主页</a>
			<a class="active" href="newVote.jsp">新建投票</a>
			<a href="listHistory.jsp">历次投票</a>
			<a href="search.jsp">查找</a>
			<a href="help/howto.html" target="_blank">使用说明</a>
			<a href="help/about.html" target="_blank">关于</a>
		</div>
	</div>
	<div style="margin:30px">
    <form method="post" action="newvote" enctype="multipart/form-data">
	    <table>
	    	<tbody>
	    		
	    		<tr><td><strong><label style="color:red;">*</label>本次投票的标题</strong></td></tr>
	    		<tr><td><input name="title" type="text" size=60></td></tr>
	    		
	    		<tr><td><strong>发起人（如不填写，则默认为当前登录用户）</strong></td></tr>
	    		<tr><td><input name="creator" type="text" size=60></td></tr>
	    		
	    		<tr><td><strong>发起部门（如不填写，则默认为当前登录用户所在部门）</strong></td></tr>
	    		<tr><td><input name="department" type="text" size=60></td></tr>
	    		
	    		<tr><td><strong><label style="color:red;">*</label>开始日期时间</strong></td></tr>
	    		<tr><td><input id="startDate" name="startDate" type="text" size=40></td></tr>
	    		
	    		<tr><td><strong><label style="color:red;">*</label>截止日期时间</strong></td></tr>
	    		<tr><td><input id="finishDate" name="finishDate" type="text" size=40></td></tr>
	    		
	    		<tr><td><strong>标签 (Tag)（非必填项）</strong></td></tr>
	    		<tr><td><input name="tags" type="text" size=60>&nbsp&nbsp<label>用空格隔开，比如<i><b> 宣传部 报刊</b></i></label></td></tr>
	    		
	    		<tr><td><strong>本次投票的说明（非必填项）</strong></td></tr>
	    		<tr><td><textarea name="description" rows="5" cols="50"></textarea></td></tr>
	    		
	    		<tr><td><strong><label style="color:red;">*</label>投票类型</strong></td></tr>
	    		<tr><td><div id="selectradiodiv">
	    			<input type="radio" id="singleradio" name="selectradio" checked="checked" /><label for="singleradio">单选</label>
					<input type="radio" id="mutiradio" name="selectradio" /><label for="mutiradio">复选</label>
				</div></td></tr>
				
				<tr><td><strong><label style="color:red;">*</label>选项</strong></td></tr>
	    		<tr><td><div id="selectitemdiv">
	    			<ul>
	    				<li><label>1.</label>&nbsp&nbsp<input type="text" id="item0" name="item0" size=60 /></li>
	    				<li><label>2.</label>&nbsp&nbsp<input type="text" id="item1" name="item1" size=60 /></li>
	    				<li><label>3.</label>&nbsp&nbsp<input type="text" id="item2" name="item2" size=60 /></li>
	    				<li><label>4.</label>&nbsp&nbsp<input type="text" id="item3" name="item3" size=60 /></li>
						<li><label>5.</label>&nbsp&nbsp<input type="text" id="item4" name="item4" size=60 />&nbsp<button class="plusbtn">继续增加选项</button></li>
					</ul>
				</div></td></tr>
	    		
	    		<tr><td><strong>选择一个附件（如无必要，不必选择）</strong></td></tr>
	    		<tr><td><input name="vote" type="file" id="attach" size=60></td></tr>
	    		
	    	</tbody>
	    </table>
	   	<input id="newvote" type="submit" value="新建">
    </form>
    </div>
  </body>
</html>
